package com.hzit.payweb.iclient.impl;

import com.hzit.paycommon.paycommonapi.aliapy.AliapyTradeQueryReq;
import com.hzit.paycommon.paycommonapi.aliapy.AlipayPrePayReq;
import com.hzit.paycommon.paycommonapi.aliapy.AlipayWapPayReq;
import com.hzit.paycommon.paycommonapi.aliapy.resp.AlipayPrePayRespData;
import com.hzit.paycommon.paycommonapi.aliapy.resp.AlipayTradeQueryRespData;
import com.hzit.paycommon.paycommonapi.aliapy.resp.AlipayWapPayRespData;
import com.hzit.paycommon.paycommonapi.resp.RespVo;
import com.hzit.payweb.iclient.IAlipayFrontClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 支付宝前置服务的降级
 */
@Component
public class AlipayFrontClientImpl implements IAlipayFrontClient {

    private Logger logger = LoggerFactory.getLogger(AlipayFrontClientImpl.class);

    @Override
    public RespVo<AlipayPrePayRespData> tradePre(AlipayPrePayReq paymentReq) {
        logger.info("调用支付宝扫码支付服务tradePre接扣熔断....");
        return new RespVo<AlipayPrePayRespData>();
    }

    @Override
    public  RespVo<AlipayWapPayRespData>  tradeWap(@RequestBody AlipayWapPayReq paymentReq){
        logger.info("调用支付宝wap支付服务的tradeWap接口熔断....");
        return new RespVo<AlipayWapPayRespData>();
    }

    @Override
    public RespVo<AlipayTradeQueryRespData> tradeQuery(AliapyTradeQueryReq tradeQueryReq) {
        logger.info("调用支付宝wap支付服务tradeQuery接口熔断....");
        return new RespVo<AlipayTradeQueryRespData>();
    }
}
